<template>
    <div class="toolbar-wrapper">
        <input class="base-input tb-input" type="text" placeholder="检索姓名、电话号码、单位名称" v-model="value"/>
        <button class="base-button tb-button" @click="normalSearch">查询</button>
        <button class="base-button tb-button" @click="advanceSearch">高级查询</button>
    </div>
</template>

<script>
    export default {
        name: "ToolBar",
        data() {
            return {
                value: ''
            }
        },
        methods: {
            normalSearch() {
                this.$emit('normal-search', this.value);
            },
            advanceSearch() {
                this.$emit('advance-search', this.value);
            }
        }
    };
</script>

<style scoped lang="scss">
    @import "../../../assets/scss/define";
    .toolbar-wrapper {
        height: $toolbar-wrapper-height;
        background-color: $toolbar-wrapper-bgColor;
        display: flex;
        justify-content: center;
        align-items: center;

        .tb-input {
            width: 50%;
            height: 60px;
            font-size: 18px;
        }
        .tb-button {
            margin-left: 20px;
            height: 60px;
            padding-left: 20px;
            padding-right: 20px;
            font-size: 18px;
        }
    }
</style>
